package com.wigem.fa.controller;

import com.wigem.fa.entity.FaEntInfoEntity;
import com.wigem.fa.entity.RegisterEntity;
import com.wigem.fa.service.FaEntInfoService;
import com.wigem.fa.service.RegisterService;
import com.wigem.fa.vo.FaEntInfoVo;
import com.wigem.framework.common.pojo.PageResult;
import com.wigem.framework.common.util.common.GuidUtils;
import com.wigem.framework.common.util.web.response.Result;
import com.wigem.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.wigem.framework.sa.token.core.annotation.IgnoreAuth;
import com.wigem.system.entity.SystemUserEntity;
import com.wigem.system.service.SystemUserService;
import com.wigem.system.vo.SystemUserVo;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import com.wigem.framework.common.util.web.response.ResultController;

import javax.annotation.Resource;
import java.util.Date;
import java.util.UUID;

@RestController
@RequestMapping("/fa/register")
public class RegisterController extends ResultController  {

    @Resource
    private RegisterService registerService;

    @IgnoreAuth
    @ResponseBody
    @PostMapping("/user")
    public Result getPageList(@RequestBody RegisterEntity registerEntity) {
       int reuslt =  registerService.register(registerEntity);
        if (reuslt == 0) {
            return success("注册成功!");
        } else {
            return fail("您注册的企业已存在！");
        }
    }
}
